<template>
  <router-view></router-view>
</template>

<script setup lang="ts">
import {onMounted} from 'vue'
import UseUser from './store/user.ts'

let globalUser = UseUser()
onMounted(() => {
  const user = JSON.parse(sessionStorage.getItem('user') ?? 'null');
  if (user) {
    globalUser.setUser(user);
  }
})
</script>